<div class="">
    {{ form(form.getAction() ~ '?tab=album' , 'class': 'forms-signup forms-horizontal' , 'id' : 'formAlbumVideo' , 'enctype' : "multipart/form-data") }}
    <div class="form-group col-md-12 col-sm-3 col-md-offset-0">
        <div class="col-md-7 padding-left-none">
            <div class="form-group col-md-12">
                <div class="col-md-1">
                    <button type="button" class="btn btn-white btn-default btn-bold btn-sm btnRemoveSelectedAlbum" data-loading-text="<i class='ace-icon fa fa-spinner fa-spin blue bigger-125'></i>">
                        <i class="ace-icon fa fa-trash-o"></i>
                    </button>
                </div>
                <div class="col-md-11">
                    <div class="input-group">
                        <input type="text" class="form-control input-sm" placeholder="Nhập tên ảnh để tìm">
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-white btn-default btn-bold btn-sm">
                                Tìm
                                <i class="ace-icon fa fa-search icon-on-right bigger-110"></i>
                            </button>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <label class="">
                {{ form.render('album') }}                
            </label>
            {{ form.renderDecorated('id') }}
        </div>
        <div class="col-md-2">
            {{ submit_button('submit' , 'class' : 'btn btn-white btn-default btn-bold btn-sm' , 'value' : 'Thêm hình ảnh') }}
        </div>
    </div>
    {{ end_form() }}
</div>

<div class="clearfix"></div>

<form class="form-horizontal" id="formSelectedRemoveAlbum" method="post">
    <div class="form-group col-md-12 col-sm-3 col-md-offset-3">
        <div>
            <table class="table">
                <thead>
                <tr>
                    <td>
                        <label class="position-relative">
                            <input type="checkbox" class="ace removeSelectedAlbumAll" name="removeSelectedAlbumAll" ng-click="checkRemoveSelectedAlbumAll()">
                            <span class="lbl"></span>
                        </label>
                    </td>
                    <td>Hình ảnh</td>
                    <td>Hành động</td>
                </tr>
                </thead>
                <tbody id="listSelectedAlbumsVideo">
                {% if(video.imageLink) %}
                {% for images in video.imageLink %}
                    {% if(images.images) %}
                    <tr id="selectedAlbumToVideo{{ images.images.getId() }}">
                        <td>
                            <label class="position-relative">
                                <input type="checkbox" class="ace selectedAlbum" name="selectedAlbum[]" value="{{ images.images.getId()}}">
                                <span class="lbl"></span>
                            </label>
                        </td>
                        <td>
                            {{ image(constant.pathUploadImage ~ images.images.getImagePath() , 'width' : '250') }}
                        </td>
                        <td>
                            {{ link_to(config.application.backendUrl ~ "/deteleImageLink/" ~ images.getId() , "<i class='ace-icon fa fa-trash-o bigger-120'></i>", "class": "btn btn-xs btn-danger") }}
                        </td>
                    </tr>
                    {% endif %}
                {% endfor %}
                {% endif %}
                </tbody>
            </table>
        </div>
    </div>
    {{ hiddenField( ['video_id','value': video.getId()]) }}
</form>

<div class="clearfix"></div>